setwd('/media/Iomega_HDD/boulot/Article/kd/last_23_01_2012/data')
require(mapdata)
load("dataset.Rdata")

opar<-par()
postscript('../Figures/Figure1.ps',width=10, height=9, horizontal=F, paper="special")
png('../Figures/Figure1.png')
#mat<-matrix(seq(1,2), nrow=2, ncol=1, byrow=T)
#layout(mat)

par(mar=c(5,5,3,0.5))
plot(0,0,xlim=c(-180,180),ylim=c(-90,110),col="transparent", xlab="Longitude", ylab="Latitude", cex.axis=2, cex.lab=2, main="", cex.main=2.5, xaxt="n", yaxt="n")
axis(side=3, tick=T, labels=F)
axis(side=4, tick=T, labels=F)
axis(side=2, at=c(-90,-45,0,45,90), labels=c("-90°","-45°","0°","45°","90°"), cex.axis=2, cex.lab=2)
axis(side=1, at=c(-180,-90,0,90,180), labels=c("-180°","-90°","0°","90°","180°"), cex.axis=2, cex.lab=2)
map("worldHires", fill=T,col="grey7", add=T)
points(t5$lat[which(t5$lambda>400)]~t5$lon[which(t5$lambda>400)], pch=21, cex=1, col="black", bg="grey50")
points(t5$lat[which(t5$lambda<400)]~t5$lon[which(t5$lambda<400)], pch=21, cex=1, col="black", bg="grey95")
legend(-75,115,legend=c("UV and visible domain", "only visible"), pch=c(21,21), pt.bg=c("grey95","grey50"),
       col=c("black", "black"),cex=2,bty="n")

dev.off()
par(opar)





















opar<-par()
postscript('/home/sylvain/Desktop/kd_model/Paper/Figures/Figure1.ps',width=10, height=16, horizontal=F, paper="special")
mat<-matrix(seq(1,2), nrow=2, ncol=1, byrow=T)
layout(mat)

par(mar=c(1,5,3,0.5))
plot(0,0,xlim=c(-180,180),ylim=c(-90,110),col="white", xlab="", ylab="Latitude", cex.axis=2, cex.lab=2, main="UV domain", cex.main=2.5, xaxt="n", yaxt="n")
axis(side=1, tick=T, labels=F)
axis(side=3, tick=T, labels=F)
axis(side=4, tick=T, labels=F)
axis(side=2, at=c(-90,-50,0,50,90), labels=c(-90,-50,0,50,90), cex.axis=2, cex.lab=2)
map("worldHires", fill=T,col="grey7", add=T)
points(lon340,lat340,col="dark blue", pch=4, cex=1.5)
points(lon320,lat320,col="purple3", pch=16, cex=1)
text(-160,98, "(a)",cex=2)
legend(-75,115,legend=c("320, 340 & 380nm", "340 & 380nm"), pch=c(16,4), col=c("purple3", "dark blue") ,cex=2,bty="n")

par(mar=c(5,5,2,0.5))
plot(0,0,xlim=c(-180,180),ylim=c(-90,90),col="white", xlab="Longitude", ylab="Latitude", cex.axis=2, cex.lab=2, main="412 - 555nm", cex.main=2.5, yaxt="n")
axis(side=3, tick=T, labels=F)
axis(side=4, tick=T, labels=F)
axis(side=2, at=c(-90,-50,0,50,90), labels=c(-90,-50,0,50,90), cex.axis=2, cex.lab=2)
map("worldHires", fill=T,col="grey7", add=T)
points(lon555,lat555,col="dark blue", pch=16, cex=1)
text(-160,85, "(b)",cex=2)
dev.off()
par(opar)

